﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ebc.DesignerDsl.CustomCode
{
    public partial class ConnectionListSelectionEditorView : UserControl
    {
        public ConnectionListSelectionEditorView()
        {
            InitializeComponent();

            this.btnCreate.Click += (sender, e) =>
            {
                if (this.NewType != null)
                {
                    this.NewType(this.txtNewType.Text);
                }
            };
        }

        public ListBox OtherTypeBox
        {
            get
            {
                return this.lstBoxOther;
            }
        }

        public ListBox SelectedTypeBox
        {
            get
            {
                return this.lstBoxSelected;
            }
        }

        public event Action<string> NewType;
    }
}